/**
 * Created by Vicky on 2017/2/23.
 */
"use strict"

//引包
const express=require("express");

const path=require("path");

//引用学生管理控制
const studentManagerCtrl=require(path.join(__dirname,"../controller/studentManagerCtrl.js"));

//创建路由
const studentManagerRouter=express.Router();


//配置路由

//获取学生信息页面
studentManagerRouter.get("/list",studentManagerCtrl.getListPage);

//获取学生信息增加页面
studentManagerRouter.get("/add",studentManagerCtrl.getAddPage);

//保存增加页面的内容
studentManagerRouter.post("/add",studentManagerCtrl.saveAddContent);

//获取编辑页面
studentManagerRouter.get("/edit/:studentId",studentManagerCtrl.getEditPage);

//编辑内容保存
studentManagerRouter.post("/edit/:studentId",studentManagerCtrl.saveEditContent);

//删除逻辑
studentManagerRouter.get("/delete/:studentId",studentManagerCtrl.delete);











//暴露路由，供入口文件使用
module.exports=studentManagerRouter;